package com.yunxun.coinmessage.controller;

import com.yunxun.coinmessage.entity.User;
import com.yunxun.coinmessage.service.UserRecomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class UserRecomController {
    @Autowired
    UserRecomService userRecomService;
    @RequestMapping("/queryRecomUser")
    public String queryRecomUser(int uid, Model model){
        List<User> userList=userRecomService.queryUserList(uid);
        model.addAttribute("userList",userList);
        model.addAttribute("total",userList.size());
        return "user-recom";
    }
}
